{$videoFields = $Upload->load_video_fields($input)}
{$requiredFields = $videoFields[0]}
{$sharingOptions = $videoFields[1]}
{$dateAndLocation = $videoFields[2]}
{$custom_fields = $videoFields[4]}

{$config_for_mp4 = $Cbucket->configs['stay_mp4']}
<div class="uploaderContainer clearfix" id="uploaderContainer">
    <div class="upload-area col-md-12">
        <div class="fileUploaderForm">
            <div class="dragDropContainer" id="dragDrop">
                <span class="upload-logo"></span>
                <strong class="block-title">{lang code="drag_drop"}</strong>
                <p>{lang code="upload_text"} {$Cbucket->configs['max_upload_size']} {lang code="upload_txt"} , {$Cbucket->configs['max_video_duration']} {lang code="upload_txt2"}</p>
            </div>
            <div class="selectButtonContainer">
                <a id="selectFiles" href="javascript:;" class="btn btn-primary btn-lg selectFiles">{lang code="select_video"}</a>
                <!-- <p>Video can be 1000 MB in size, 120 Min in Duration and Any common format<br>You can also upload HD videos</p> -->
            </div>
            <!-- <a id="uploadFiles" class="btn btn-success" href="javascript:;">Upload</a> -->
            
        </div>
    </div>
</div>
<div id="uploadDataContainer" class="uploadDataContainer hidden">
    <div class="uploadingProgressContainer">
    </div>
    <div class="realProgressBars">
        
    </div>
    <div class="align-right hidden" id="uploadMore">
        <a href="#" class="btn btn-primary uploadMoreVideos" id="uploadMoreVideos">{lang code="upload_more_videos"}</a>

    </div>
    <div id="files"></div>
    <div id="allUploadForms" class="tab-content allUploadForms"></div>
</div>

<form action="#" id="updateVideoInfoForm" class="hidden" enctype="multipart/form-data" method="post">
    <div class="row">
        <div class="col-md-8">
            <div class="" id="updateVideoInfo">
                <fieldset class="">
                    <legend class="">{$requiredFields.group_name}</legend>
                </fieldset>
                <div class="requiredFields">
                  {foreach $requiredFields.fields as $field}
                        <div class="form-group">
                        {$field.class='form-control'}
                        {$field.notShowSeprator='yes'}
                        {if $field.type == 'radiobutton'}
                            {$field.label_class='radio'}
                            {$field.class=''}
                            {$formObj->createField($field)}
                        {elseif $field.type == 'checkbox'}
                            {$categories = $field}
                        {else}
                            <label for="{$field.id}">{$field.title}</label>
                            {$formObj->createField($field)}
                        {/if}
                        </div>
                    {/foreach}
                  
                    
                    <div id= "duration" class="form-group hidden">
                        <label for="duration">Duration</label>
                        <input type="text" placeholder="" name="duration" id="duration" class="form-control" cols="45">

                    </div>

                  <!--   <div class="form-group">
                        <label for="thumb12">Thumbnail</label>
                        <input  class="thumb12"  name="thumb12" type="file" placeholder=""   class="form-control" cols="45">
                    </div> -->

            
                    {ANCHOR place="upload_video_form"}
                </div>
                {if $custom_flag && $custom_fields!=""}
                    <div class="formSection clear">
                        <h4>{$custom_fields.group_name} <i class="glyphicon glyphicon-chevron-down pull-right"></i></h4>
                        <div class="sectionContent hidden">
                            {foreach $custom_fields.fields as $field}
                            <div class="form-group">
                            {$field.class='form-control'}
                            {$field.notShowSeprator='yes'}
                                {if $field.type == 'radiobutton'}
                                    {$field.label_class='radio'}
                                    {$field.class=''}
                                    {$formObj->createField($field)}
                                {elseif $field.type == 'checkbox'}
                                    <h4>{$field.title}</h4>
                                    {$field.label_class='checkbox'}
                                    {$field.class='checkbox'}
                                    {$formObj->createField($field)}
                                {else}
                                    <label for="{$field.id}">{$field.title}</label>
                                    {$formObj->createField($field)}
                                {/if}
                                </div>
                            {/foreach}    
                        </div>
                    </div>
                {/if}
                <div class="formSection clear">
                    <h4>{$dateAndLocation.group_name} <i class="glyphicon glyphicon-chevron-down pull-right"></i></h4>
                    <div class="sectionContent hidden">
                        {foreach $dateAndLocation.fields as $field}
                        <div class="form-group">
                        {$field.class='form-control'}
                            {$field.notShowSeprator='yes'}
                            {if $field.type == 'radiobutton'}
                                {$field.label_class='radio'}
                                {$field.class=''}
                                {$formObj->createField($field)}
                            {elseif $field.type == 'checkbox'}
                                <h4>{$field.title}</h4>
                                {$field.label_class='checkbox'}
                                {$field.class='checkbox'}
                                {$formObj->createField($field)}
                            {else}
                                <label for="{$field.id}">{$field.title}</label>
                                {$formObj->createField($field)}
                            {/if}
                            </div>
                        {/foreach}    
                    </div>
                </div>
  
                <div class="formSection clear">
                    <h4>{$sharingOptions.group_name}<i class="glyphicon glyphicon-chevron-down pull-right"></i></h4>
                    <div class="sectionContent hidden">
                        {foreach $sharingOptions.fields as $field}
                            <div class="form-group">
                            {$field.class='form-control'}
                            {$field.notShowSeprator='yes'}
                            {if $field.type == 'radiobutton'}
                                {$field.label_class='radio'}
                                {$field.class=''}
                                {$formObj->createField($field)}
                            {else}
                                <label for="{$field.id}">{$field.title}</label>
                                {$formObj->createField($field)}
                            {/if}
                            </div>
                        {/foreach}
                    </div>
                </div>

                <div class="pad-bottom-sm text-right">
                    <button class="btn btn-primary btn-lg"   id="saveVideoDetails">{lang code="submit_now"}</button>
                </div>  
            </div>
        </div>
        <div class="col-md-4 uploadFormSidebarDiv">
            <h4>{$categories.title}</h4>
            <small>{$categories.hint_1}</small>
            <div class="categoriesContainer">
                {$categories.label_class='checkbox'}
                {$categories.class='checkbox'}
                {$formObj->createField($categories)}
            </div>
            <!-- <div class="cb-box pad-bottom terms-contatiner">
                <div class="checkbox">
                    <label class="light">
                        <input type="checkbox" value="">
                        I have read and agree to submission policy
                    </label>
                </div>
                <div class="checkbox">
                    <label class="light">
                        <input type="checkbox" value="">
                        I have read and agree to terms and conditions
                    </label>
                </div>
                <div class="checkbox">
                    <label class="light">
                        <input type="checkbox" value="">
                        Remember these settings
                    </label>
                </div>
            </div> -->
        </div>
    </div>
</form>